<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<title>Command-Line</title>
		<link type="text/css" rel="stylesheet" href="PLUGINS_ROOT/org.polarsys.capella.studio.doc/html/style/style.css"/>
	</head>
	<body>
		<h1 id="command-line">Command Line</h1>
		<p>Capella provides a command line functionality. This functionality helps users to launch some Capella commands from a shell or a build engine like Jenkins.</p>
		<p>The set of command proposals can be extended with additional specific commands that can be contributed through an extension point. </p>
		<p>The extension point is provided by:</p>
		<ul>
			<li>the plug-in org.polarsys.capella.core.commandline.core</li>
			<li>and its identifier commandline.</li>
		</ul>
		<p>The contribution to the extension point is done in the plugin.xml file of the plugin. Open this file and focus on the plugin.xml tab:</p>
		<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;?eclipse version="3.4"?&gt;
&lt;plugin&gt;
   &lt;extension point="org.polarsys.capella.core.commandline.core.commandline"&gt;
      &lt;CommandlineExtension
         class=""
         id=""&gt;
      &lt;/CommandlineExtension&gt;
   &lt;/extension&gt;
&lt;/plugin&gt;</code></pre>
		<h2 id="detail-of-the-different-fields">Detail of the different fields</h2>
		<ul>
			<li>
				<code>class</code>: a java class inheriting of 
				<a href="https://github.com/eclipse-capella/capella/blob/master/core/plugins/org.polarsys.capella.core.commandline.core/src/org/polarsys/capella/core/commandline/core/ICommandLine.java" target="_blank">org.polarsys.capelle.core.commandline.core.ICommandLine</a>
			</li>
			<li>
				<code>id</code>: an unique identifier for the command
			</li>
		</ul>
		<h2 id="commandline-implementation">CommandLine implementation</h2>
		<p>The 
			<a href="https://github.com/eclipse-capella/capella/blob/master/core/plugins/org.polarsys.capella.core.commandline.core/src/org/polarsys/capella/core/commandline/core/ICommandLine.java" target="_blank">org.polarsys.capelle.core.commandline.core.ICommandLine</a> class provides some facilities to manage messages.
		</p>
		<p>You can also inherits of
			<br/>
			<a href="https://github.com/eclipse-capella/capella/blob/master/core/plugins/org.polarsys.capella.core.commandline.core/src/org/polarsys/capella/core/commandline/core/AbstractCommandLine.java" target="_blank">org.polarsys.capelle.core.commandline.core.AbstractCommandLine</a> providing some helpers.
		</p>
		<h2 id="sample">Sample</h2>
		<p>The validation can be triggered by command line</p>
		<ul>
			<li>The 
				<a href="https://github.com/eclipse-capella/capella/blob/master/core/plugins/org.polarsys.capella.core.validation.commandline/src/org/polarsys/capella/core/validation/commandline/ValidationCommandLine.java" target="_blank">Java class</a> defining the quickfix
			</li>
			<li>Its registration within 
				<a href="https://github.com/eclipse-capella/capella/blob/c55af03da4a1e2ba1aa1cc78632a365fc4fc3e51/core/plugins/org.polarsys.capella.core.validation.commandline/plugin.xml#L14" target="_blank">plugin.xml</a>
			</li>
			<li>In 
				<a href="https://github.com/eclipse-capella/capella/blob/c55af03da4a1e2ba1aa1cc78632a365fc4fc3e51/core/plugins/org.polarsys.capella.core.validation.commandline/META-INF/MANIFEST.MF#L9" target="_blank">MANIFEST/MANIFEST.MF</a> file we need to depend on 
				<code>org.polarsys.capella.core.commandline.core</code>
			</li>
		</ul>
	</body>
</html>